class computer {
    String brand;
    String cup;
    int screen_hz;
    String xian_card;
    // void input(String brand,String cup,int screen_hz,String xian_card){
    //     this.brand = brand;
    //     this.cup = cup;
    //     this.screen_hz = screen_hz;
    //     this.xian_card = xian_card;
    // }
    void display( String brand,String cup,int screen_hz,String xian_card){
        System.out.println("    "+"品牌："+brand);
        System.out.println("    "+"屏幕刷新率："+screen_hz+"hz");
        System.out.println("    "+"CUP："+cup);
        System.out.println("    "+"显卡："+xian_card);
    }
} 
class student {
    String name;
    String sex = "男";
    computer c1 = new computer();
    computer c2 = new computer();
    computer c3 = new computer();
    String b[] = {"一","二","三","四"};
    // void input(String name,String sex,computer c,String brand,String cup,int screen_hz,String xian_card){
    //     this.name = name;
    //     this.sex = sex;
    //     this.c.input(brand, cup, screen_hz, xian_card);
    // }
    void display(String name,String sex,computer...computers){
        System.out.println("************");
        System.out.println("姓名: "+name+"   "+"性别: "+sex);
        int i =0;
        for (computer c :computers){
            System.out.println("---------------");
            System.out.println("电脑配置"+b[i]+":");
            c.display(c.brand,c.cup,c.screen_hz,c.xian_card);
            i++;
    }

    }
}
public class information {
    public static void main(String[] args) throws Exception {
        student s1 = new student();
        student s2 = new student();
        // s1.input("小明", "男", s1.c1, "华硕", "i9-13900HX", 240, "RTX4090");
        s1.name = "小明";
        s2.name = "小华";
        s1.c1.brand = "华硕";
        s1.c1.cup = "i9-13900HX";
        s1.c1.screen_hz = 240;
        s1.c1.xian_card = "RTX4090";
        s1.c2.brand = "联想";
        s1.c2.cup = "i9-13900HX";
        s1.c2.screen_hz = 240;
        s1.c2.xian_card = "RTX4060";
        s2.c1.brand = "红米";
        s2.c1.cup = "i7-12650H";
        s2.c1.screen_hz = 144;
        s2.c1.xian_card = "RTX3050";
        s2.c2.brand = "ROG";
        s2.c2.cup = "i9-13900HX";
        s2.c2.screen_hz = 240;
        s2.c2.xian_card = "RTX4090";
        s1.display(s1.name,s1.sex,s1.c1,s1.c2);
        s2.display(s2.name,s2.sex,s2.c1,s2.c2);
    }
}
